{% extends "templates/base.phtml" %}
{%block content%}
{% if wxc is defined %}
<!-- PAGE CONTENT WRAPPER -->
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('editor');
    UE.getEditor('editor');

</script>
<div class="page-content-wrap">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="admin/appact/newact">创建活动</a></li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="tab-pane active">
                        <div class="col-md-12">
                            <div class="col-md-3 col-xs-6 pull-left">
                                <h3>管理</h3>
                            </div>
                            <div class="col-md-2 col-xs-2 pull-right">
                                <a class="btn btn-success back" href="admin/appact">返回</a>
                            </div>
                            <div class="form-horizontal">
                                <div class="panel panel-default">
                                    <div class="panel-body def-pan-bd">
                                        <div class="col-bd col-md-12 col-xs-12">
                                            <div class="col-md-12 form-horizontal">


                                                <form action="/admin/appact/newact" class="form-horizontal" method="post">

                                                <div class="form-group">
                                                    <label class="col-md-3 col-xs-12 control-label">活动名称：</label>
                                                    <div class="col-md-6 col-xs-12">
                                                        <div class="input-group">
                                                            <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                            <input name="name" type="text" class="form-control">
                                                        </div>
                                                    </div>
                                                </div>



                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">活动图片</label>
                                                        <div class="col-md-6 col-xs-12">
                                                            <input id="fileup" name="fileup" type="file" multiple="true">
                                                            <input id="pic" name="pic" class="form-control"  type="hidden" value="">
                                                            <img id="thumb" src="" style="max-height: 200px;max-width: 200px">
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">时间：</label>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="input-group" style="z-index:1000;">
                                                                <span class="input-group-addon"><span class="fa fa-calendar"></span></span>
                                                                <input name="time" type="text" class="form-control datepicker" value="">
                                                            </div>
                                                        </div>
                                                    </div>


                                                    <div class="form-group">
                                                    <label class="col-md-3 col-xs-12 control-label">地点：</label>
                                                    <div class="col-md-6 col-xs-12">
                                                        <div class="input-group">
                                                            <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                            <input name="place" type="text" class="form-control" >
                                                        </div>
                                                    </div>
                                                </div>



                                          <!--      <div class="form-group">
                                                    <label class="col-md-3 col-xs-12 control-label">详细：</label>
                                                    <div class="col-md-6 col-xs-12">
                                                        <textarea name="detail" class="form-control" rows="10"></textarea>
                                                    </div>
                                                </div>-->

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">详情</label>
                                                        <div class="col-md-6 col-xs-12">
                                                            <script id="editor" type="text/plain" style="width:550px;height:300px;"></script>
                                                        </div>
                                                    </div>


                                                <div class="form-group col-md-12">
                                                    <div class="col-md-6 col-xs-12 col-md-offset-4">
                                                        <button class="btn btn-primary " >提交</button>
                                                      <!--  <button class="btn btn-danger">取消</button>-->
                                                    </div>
                                                </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{%endif%}
{%endblock%}
{%block end%}


<script src="/assets/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/assets/uploadify/uploadify.css">
<script type="text/javascript">

    $(function() {
        $('#fileup').uploadify({
            'formData'     : {
            },
            'swf'      : '/assets/uploadify/uploadify.swf',
            'uploader' : '/admin/resource/upload',
            'cancelImg': '/assets/uploadify/uploadify-cancel.png',//单个取消上传的图片
            'onUploadSuccess': function (file, data, response) {
                var data = JSON.parse(data);
                if (data.status == 1) {
                    $('#pic').val(data.data);
                    $('#thumb').attr("src",data.data);
                    $('#thumb').css("display","block");
                }

            }
        });

    });
</script>
<!-- END PAGE CONTENT WRAPPER -->
{%endblock%}
